home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / c / xw2.000 / xw2 / xw / samples / BASIC-PRINCIPLES / helloworld.xwx next >
Encoding:
Text File  |  1994-12-04  |  1.2 KB  |  24 lines

  1. %  This sample shows how to create
  2. %  - a user interface with a data space of 90kB
  3. %  - an editable "String-Object": this makes a string VAR-Element editable
  4. %    named as "OBJ:TEST1.V" (referred to as the "VAR-Parameter" of obj. TEST9)
  5. %  - a "Stop Button" that executes the macro file "/xw/x/xbwstop.mta" when
  6. %    pressed
  7.  
  8. Malloc(90);                              %Get memory
  9. @xbwstart(("simple-project") ("bw"));    %Setup xbw system in "bw"/"color"
  10. wdw(TEST 3 4 20 11 StandardWDW);         %Window: name,x,y,w,h
  11.                                     %TEXT object body:
  12. o(TEST1 S S 2 5 15 1 Standard);          % name,disp,edit,x,y,w,h,color class
  13. bg(TEST1 . (" Hello World!"));      %TEXT object head: name,contents
  14.                                          % edit type "S" implies obj-action
  15.   eg();                                  % end of head (object VAR-Group)
  16.                                     %EXIT button body:
  17. o(TEST2 S . 9 9 8 1 Dangerous);          % name,disp,edit,x,y,w,h,color class
  18. bg(TEST2 .(" Exit"));               %EXIT button head: name,contents
  19.   cn(raK("@xbwstop();"));                % object action
  20.   eg();                                  % end of head (object VAR-Group)
  21. Message(("Project Complete."));     %That's it!
  22. End();
  23.  
  24.